#include <stdio.h>

struct Game {
    char author[20]; 
    int year;
    char CName[20];
    char profit[20];
};

void print(struct Game* p) {
    printf("%s %d %s %s\n\n", (*p).author, (*p).year, (*p).CName, (*p).profit);
    
	//结构体指针变量"->"成员名
	printf("%s %d %s %s\n\n", p->author, p->year, p->CName, p->profit);
}

int main() {
    struct Game x = {"Rockstar games", 2013, "侠盗猎车手5", "60亿美元"};
    
    print(&x);
    
    //结构体对象"."成员名 
    printf("%s\n%d\n%s\n%s\n", x.author, x.year, x.CName, x.profit);
       
    return 0;
}
